package com.jeesite.modules.dp.entity.xinwen;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 新闻管理Entity
 * @author hancing
 * @version 2024-12-19
 */
@Table(name="dp_xinwen", alias="a", label="新闻信息", columns={
		@Column(name="id", attrName="id", label="ID", isPK=true),
		@Column(name="title", attrName="title", label="标题", queryType=QueryType.LIKE),
		@Column(name="xwtype", attrName="xwtype", label="文章类型"),
		@Column(name="smallpic", attrName="smallpic", label="缩略图"),
		@Column(name="h5url", attrName="h5url", label="外部URL"),
		@Column(name="wzcontent", attrName="wzcontent", label="内容"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class DpXinwen extends DataEntity<DpXinwen> {
	
	private static final long serialVersionUID = 1L;
	private String title;		// 标题
	private String xwtype;		// 文章类型
	private String smallpic;		// 缩略图
	private String h5url;		// 外部URL
	private String wzcontent;		// 内容

	public DpXinwen() {
		this(null);
	}
	
	public DpXinwen(String id){
		super(id);
	}
	
	@NotBlank(message="标题不能为空")
	@Size(min=0, max=255, message="标题长度不能超过 255 个字符")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@NotBlank(message="文章类型不能为空")
	@Size(min=0, max=1, message="文章类型长度不能超过 1 个字符")
	public String getXwtype() {
		return xwtype;
	}

	public void setXwtype(String xwtype) {
		this.xwtype = xwtype;
	}
	
	@Size(min=0, max=255, message="缩略图长度不能超过 255 个字符")
	public String getSmallpic() {
		return smallpic;
	}

	public void setSmallpic(String smallpic) {
		this.smallpic = smallpic;
	}
	
	@Size(min=0, max=255, message="外部URL长度不能超过 255 个字符")
	public String getH5url() {
		return h5url;
	}

	public void setH5url(String h5url) {
		this.h5url = h5url;
	}
	
	public String getWzcontent() {
		return wzcontent;
	}

	public void setWzcontent(String wzcontent) {
		this.wzcontent = wzcontent;
	}
	
}